#include "stm32f10x.h"                  // Device header
#include "PWM.h"
void Servo_Init(void)
{
	PWM_TIM3_Init();
}

void Servo_SetAngle(u8 angle)  //0-180
{
	if(angle > 180) {
		PWM_TIM3_SetCompare1(25);
		return;
	}
	PWM_TIM3_SetCompare1(angle/180.0*20 + 5);
}
